package RobertsCoalition;



public class CoalitionWithInfo implements CoalitionWithInfoInterface, Comparable<CoalitionWithInfo>{

	Coalition coalition;
	int coalitionSize;
	float coalitionModulatedSize;
	public CoalitionWithInfo(Coalition coalition,
			int coalitionSize, float coalitionModulatedSize) {
		super();
		this.coalition = coalition;
		this.coalitionModulatedSize = coalitionModulatedSize;
		this.coalitionSize = coalitionSize;
	}
	/* (non-Javadoc)
	 * @see CoalitionInfo#getCoalition()
	 */
	public Coalition getCoalition() {
		return coalition;
	}
	/* (non-Javadoc)
	 * @see CoalitionInfo#getCoalitionSize()
	 */
	public int getCoalitionSize() {
		return coalitionSize;
	}
	/* (non-Javadoc)
	 * @see CoalitionInfo#getCoalitionModulatedSize()
	 */
	public float getCoalitionModulatedSize() {
		return coalitionModulatedSize;
	}
	/* (non-Javadoc)
	 * @see CoalitionInfo#compareTo(Population.CoalitionWithInfo)
	 */
	@Override
	public int compareTo(CoalitionWithInfo arg0) {
		float arg0Size = arg0.getCoalitionModulatedSize();
		float thisSize = this.getCoalitionModulatedSize();
		if(arg0Size < thisSize) return -1;
		else if(arg0Size == thisSize) return 0;
		else return 1;
	}

}